﻿using System;
using System.Collections.Generic;
using Dict.DataModel;


namespace UI
{
    public class UISkill
    {
        public TableSkill skillData;
        public int skillIndex;//0,1,2;大招默认为2

        public void InitData(string skillId,int skillIndex)
        {
            this.skillData = Dict.DictDataManager.Instance.tableSkillDao.GetById(skillId);
            if (skillData == null)
            {
                throw new System.NullReferenceException("skillId:" + skillId);
            }
            this.skillIndex = skillIndex;
        }

        /// <summary>
        /// 更新技能位置顺序
        /// </summary>
        /// <param name="newIndex"></param>
        public void UpdateSkillIndex(int newIndex)
        {
            this.skillIndex = newIndex;
        }
    }
}